<template>
	<view>
		<view class="order-box">
			<view class="" @tap="swiperChange(0)">当前订单</view>
			<view class="" @tap="swiperChange(1)">历史订单</view>
		</view>
		
		<swiper class="swiper-box" :current="currentIndex">
			<swiper-item>当前订单</swiper-item>
			<swiper-item>历史订单</swiper-item>
		</swiper>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				currentIndex:0
			}
		},
		methods: {
			swiperChange(index){
				this.currentIndex=index;
			}
		}
	}
</script>

<style lang="scss">
.order-box{
	display: flex;
}
</style>
